package com.jkkc.lib.base.extend

import android.app.Activity
import com.blankj.utilcode.util.ToastUtils


/**
 * Author:LiXian
 * <p>
 * Desc:Activity扩展
 * Version:1.0
 * date 2022/10/26 17:56
 */
fun Activity.showShort(content: String?) {
    content.takeIf { !it.isNullOrEmpty() }?.let { ToastUtils.showShort(it) }
}

fun Activity.showShort(content: Int?) {
    content?.let { if (it > 0) ToastUtils.showShort(it) }
}

fun Activity.showShort(res: Int, content: String?) {
    content?.let { ToastUtils.showShort(res, content) }
}

fun Activity.showLong(content: String?) {
    content?.let { ToastUtils.showLong(it) }
}

fun Activity.showLong(content: Int?) {
    content?.let { ToastUtils.showLong(it) }
}